﻿<!DOCTYPE html>
<html>
<head>
  <title>Serpentine Layout</title>
  <!-- Copyright 1998-2021 by Northwoods Software Corporation. -->
  <meta name="description" content="TypeScript: Arrange a chain of nodes in rows, alternating directions, back and forth." />
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <script src="../samples/assets/require.js"></script>
  <script src="../assets/js/goSamples.js"></script> <!-- this is only for the GoJS Samples framework -->
  <script id="code">
    function init() {
      require(["SerpentineScript"], function(app) {
        app.init();
      });
    }
  </script>
</head>
<body onload="init()">
  <div id="sample">
    <div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:500px; min-width: 200px"></div>
    <p>
      This sample demonstrates a custom Layout, SerpentineLayout, which assumes the graph consists of a chain of nodes.
      The layout is defined in its own file, as <a href="SerpentineLayout.ts">SerpentineLayout.ts</a>.
    </p>
    <p>
      It also has <a>Layout.isViewportSized</a> set to true, so that resizing the Diagram DIV will automatically re-layout.
    </p>
  </div>
</body>
</html>